package com.jinzhi.jinzhidata.enums;

import lombok.Getter;

/**
 * @author vansl
 * @description
 * @date 17:07
 **/
@Getter
public enum ResultEnum {

    SUCCESS(0, "成功"),
    WRONG(1, "出错了"),
    NOT_LOGIN(1001, "未登录或登录过期"),
    PERMISSION_DENIED(1002, "无权限"),
    LOGIN_FAIED(1003, "登录失败"),
    SMS_SEND_FAILED(2001, "短信发送失败"),
    NULL_ERROR(3001, "获取失败"),
    ATTACHMENT_EMPTY_ERROR(4001, "文件为空"),
    ATTACHMENT_UPLOAD_FAILED(4002, "文件上传失败"),
    UPLOAD_FAILED(4003, "上传失败"),
    IMAGE_FORMAT_ERROR(4004, "图片文件格式错误"),
    RESOURCE_FIELD_EMPTY(4005, "必填字段缺失"),
    SELF_RESOURCE_BOUGHT_ERROR(5001, "无法购买自己上传的资源"),
    RESOURCE_HAS_BEEN_BOUGHT_ERROR(5002, "已经购买过该资源"),
    BALANCE_LESS_THAN_ERROR(5003, "积分不足，请充值积分"),
    RESOURCE_NOT_BEEN_BOUGHT_ERROR(6001, "您还没有购买该资源"),
    RESOURCE_FILE_NOT_EXISTS(6002, "该资源文件不存在"),
    CHARGE_ORDER_CREATE_FAILED(7001, "积分充值订单创建失败"),
    WITHDRAW_AMOUNT_LOWER_THAN_ONE_ERROR(7002, "提现失败，提现金额需要大于0.01元"),
    WITHDRAW_AMOUNT_HIGHER_THAN_BALANCE_ERROR(7003, "提现失败，积分余额少于提现金额"),
    WITHDRAW_FAILED(7004, "提现失败"),
    USERNAME_PARAM_EMPTY(8001, "用户名不得为空"),
    USER_NOT_EXISTS(9001, "用户不存在"),
    USERNAME_OR_PASSWORD_WRONG(9002, "用户名或密码错误"),
    IMAGE_EMPTY_ERROR(10001, "轮播图不得为空"),
    ARTICLE_EMPTY_ERROR(10002, "轮播文章不得为空"),
    ARTICLE_DELETE_ERROR(10002, "轮播文章未发布");

    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
